@import (reference) "mixins";
@import (reference) "variables";

@imagesPath: '../images/select2.png';
@imagesPath2x: '../images/select2x2.png';
@spinnerPath: '../images/spinner.gif';

.select2-container {
  vertical-align: middle;
}

.select2-container .select2-choice {
  height: 20px;
  line-height: 20px;
  border-color: @darkGrey;
  border-radius: 0;
  background: #fff;
  text-align: left;
}

.select2-container .select2-choice,
.select2-container .select2-choices {
  .trans(border-color);
}

.select2-container .select2-choice abbr {
  top: 4px;
}

.select2-container .select2-choice div {
  width: 19px;
  border: none;
  border-radius: 0;
  background: #fff;
}

.select2-container .select2-choice div b {
  top: 4px;
  background-position: 1px -1px;
}

.select2-dropdown-open .select2-choice div b {
  background-position: -17px -1px;
}


.select2-container-active .select2-choice,
.select2-container-active .select2-choices {
  border-color: @highlighted;
  box-shadow: none;
}

.select2-dropdown-open .select2-choice {
  box-shadow: none;
}

.select2-drop {
  border-color: @darkGrey;
  border-radius: 0;
}

.select2-drop-active {
  border-color: @highlighted;
}

.select2-dropdown-open.select2-drop-above .select2-choice,
.select2-dropdown-open.select2-drop-above .select2-choices {
  border-color: @highlighted;
  border-radius: 0;
  background: #fff;
}

.select2-drop.select2-drop-above.select2-drop-active {
  border-color: @highlighted;
  border-radius: 0;
}

.select2-drop.select2-drop-above .select2-search input {
  margin-top: 0;
}

.select2-results {
  margin: 0;
  padding: 5px 0;
  border-top: 1px solid @darkGrey;
}

.select2-results .select2-result-label {
  height: 20px;
  line-height: 20px;
  padding: 0 8px;
  color: @baseFontColor;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select2-results .select2-no-results,
.select2-results .select2-searching,
.select2-results .select2-selection-limit,
.select2-more-results.select2-active {
  height: 20px;
  line-height: 20px;
  padding: 0 10px;
}

.select2-results .select2-highlighted {
  background: transparent;
  color: @baseFontColor;
}

.select2-results .select2-highlighted .select2-result-label {
  background: darken(@grey, 5%);
}

.select2-search {
  padding: 4px;
}

.select2-search input {
  height: 20px;
  padding: 0 7px;
  border-color: @darkGrey;
  background: #fff !important;
}

.select2-container-multi .select2-choices {
  min-height: 19px;
  padding-bottom: 1px;
  border-color: @darkGrey;
  background: #fff;
}

.select2-container-multi.select2-container-active .select2-choices {
  border-color: @highlighted;
  box-shadow: none;
}

.select2-container-multi .select2-choices .select2-search-field input {
  height: 16px;
  padding: 0 3px;
}

.select2-container-multi .select2-choices .select2-search-choice {
  margin: 1px 1px 0 1px;
  padding: 1px 5px 2px 18px;
  border-radius: 0;
  border-color: @darkGrey;
  background: @grey;
  box-shadow: none;
}

.select2-search-choice-close {
  top: 2px;
}

.select2-search-choice-close,
.select2-container .select2-choice abbr,
.select2-container .select2-choice div b {
  background-image: url(@imagesPath);
}

.select2-search input.select2-active,
.select2-more-results.select2-active,
.select2-container-multi .select2-choices .select2-search-field input.select2-active {
  background-image: url(@spinnerPath);
}

@media @retina {
  .select2-search-choice-close,
  .select2-container .select2-choice abbr,
  .select2-container .select2-choice div b {
    background-image: url(@imagesPath2x) !important;
  }
}







